<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">

    {{ partial "head.html" . }}
    <link rel="stylesheet" href="{{ "css/blog.css" | relURL}}?t={{ mul 1000 (time now).Unix }}">
    {{$lan := index (split .URL "/") 1 }}
    {{if ne $lan "zh-cn"}}
    {{$lan = "" }}
    {{else}}
    {{$lan = "zh-cn/" }}
    {{end}}
    {{ $currentTag :=.Title}}
    <body>

    <div id="all">

      <header>

          {{ partial "nav.html" . }}

      </header>
        <div class="nav-mask hide"></div>
        <div class="blog-mask hide"></div>
      <div class="tag-filter">
          <div class="tag-filter-header">
              <div class="header-left">
                  <img style="height:17px; width: 17px;" src="{{ "img/blogs/Filter_Green.svg" | relURL}}" alt="">
                  <span class="selectedTagFilter">{{ i18n "MAIN_POSTBLOG_FILTER"}}</span>
              </div>
              <div  class="header-right">
                  <a style="color:rgba(0,0,0,1);line-height:26px;" href={{ i18n "BLOG_LINK"}} >
                  <img style="height:16px; width: 16px;" src="{{ "img/blogs/Post_Black.svg" | relURL}}" alt="">
                  <span>{{ i18n "MAIN_POSTBLOG_SOURCE"}}</span>
              </a>
              </div>
          </div>
          <div class="tag-filter-content hide">
              <p>{{ i18n "SIDEBAR_TAG" }}</p>
              <ul>
                {{ range $name, $items := .Site.Taxonomies.tags }}
                {{ if eq ($currentTag|urlize)  ($name|urlize) }}
                <a href="{{ $.Site.BaseURL }}{{$lan}}blog.html" class="selectedTag"> {{ $name }}</a>
                {{ else }}
                <a href="{{ $.Site.BaseURL }}{{$lan}}tags/{{ $name | urlize | lower }}.html" > {{ $name }}</a>
                {{ end }}
                {{ end }}
              </ul>
          </div>
      </div>
      <div id="content" class="blog-footer">
          <div class="container">
              <div class="row">
                  <!-- *** LEFT COLUMN *** -->

                  <h1 class="blog-post">{{ i18n "BLOG_TITLE" }}</h1>

                  <div class="col-md-9" id="blog-listing-medium">

                      {{ $paginator := .Paginate (where .Data.Pages "Type" "blog") }}
                      {{ range $paginator.Pages }}
                      <section class="post">
                            <div class="row">
                            <div class="col-md-12">
                                <h3><a href="{{ .Permalink }}" class="fz16" target="_blank">{{ .Title }}</a></h3>
                                <div class="clearfix">
                                <p class="author">
                                    {{ if isset .Params "author" }}
                                    <span>{{ .Params.author }}</span>
                                    {{ end }}
                                </p>
                                {{ if isset .Params "date" }}
                                <p class="date-comments">
                                    <span class="character">|</span>
                                    <span> {{ .Date.Format .Site.Params.date_format }}</span>
                                    <span class="character">|</span>
                                </p>
                                {{ end }}
                                <p class="tags">
                                    {{ if isset .Params "tags" }}
                                    {{ if gt (len .Params.tags) 0 }}
                                    {{ range .Params.tags }}
                                    {{ if eq $currentTag .}}
                                    <a  href="{{ $.Site.BaseURL }}{{$lan}}blog.html" class="selectedTag">{{ . }}</a>
                                    {{ else }}
                                    <a  href="{{ $.Site.BaseURL }}{{$lan}}tags/{{ . | urlize }}.html">{{ . }}</a>
                                    {{ end }}
                                    {{ end }}
                                    {{ end }}
                                    {{ end }}
                                </p>
                                </div>
                                <p class="intro">{{ .Summary }}</p>
                                <p class="read-more"><a href="{{ .Permalink }}" target="_blank">{{ i18n "MAIN_LIST_MORE" }}</a>
                                </p>
                            </div>
                            </div>
                            </section>
                    {{ end }}

                </div>

                <div class="col-md-3">


                    {{ partial "sidebar.html" . }}



                </div>


        </div>

        </div>

    </div>


    {{ partial "footer.html" . }}

    </div>
    <!-- /#all -->

    {{ partial "scripts.html" . }}
    <script src="{{ "js/blog.js" | relURL }}?t={{ mul 1000 (time now).Unix }}"></script>

</body>
</html>
